<template>
	<view class="header-bg-image header-bg">
		<view style="height: 50rpx;"></view>
		<view class="padding-30">
			<view class="margin-30-0 flex-around" @click="$tools.navigateBack()">
				<u-icon name="arrow-left" color="#333333" size="20"></u-icon>
				<view class="fontSize-18 color-000 flex1 text-center">选择道观</view>
				<view style="width: 40rpx;"></view>
			</view>
		    <!-- 列表 -->
			<view class="flex margin-bottom30 padding-30 tao-image" 
			@click="$tools.navigateTo('/pages/auspiciousness/taoist-temple-info?store_id='+item.id+'&store_name='+item.title)"
			v-for="(item,index) in list" :key="index">
				<image class="img-160 margin-right20 border-radius10" :src="item.image" mode=""></image>
				<view>
					<view class="fontSize-15 color-000 margin-bottom20">{{item.title}}</view>
					<view class="fontSize-15 color-999">{{item.address}}</view>
				</view>
			</view>
			<u-empty v-if="list.length == 0"
			        mode="list"
			        icon="http://cdn.uviewui.com/uview/empty/list.png"
					width="150px"
					height="150px"
					text="列表为空"
					textSize="18"
			>
			</u-empty>
		</view>
	</view>
</template>

<script>
	export default {
		data(){
			return{
				list:[],
			}
		},
		onShow() {
			this.getStoreList()
		},
		methods:{
			async getStoreList(){
				let res = await this.$http.post(this.$api.store_list,{type:2},{token:true})
				if(res.code ==1){
					this.list = res.data
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.tao-image{
		background: url('https://wudang.chunchuangkeji.cn/image/21.png') no-repeat; background-size: 100% 100%;
	}
	.taoist-item{
		padding: 30rpx;
	}
	.header-bg-image {
		width: 100%;
		min-height: 100vh;
	}
</style>